1. Field of the Invention
The invention relates to a method of encoding and decoding data in blocks, each block being constituted by a fixed number of data words each comprising a maximum of n bits; and relates to an encoding device and a decoding device implementing this method.
2. Description of the Related Art
The blocks can for example be tables of 8.times.8 or 16.times.16 cosine transformation coefficients resulting from the encoding of the series of images by the cosine transformation. Such a table comprises numerous zero coefficients. The non-zero coefficients have probabilities of appearance which decrease as a function of the absolute value of the coefficients. Conventionally, these coefficients are encoded using a variable length encoding, such as a Huffman encoding which consists in representing by shorter code words the coefficients having the highest probabilities of appearance. A Huffman encoding is efficient if there is a great difference between the probabilities of appearance of the most frequent values and those of the least frequent values. On the other hand, this type of encoding is not efficient for encoding words which have probabilities of appearance which are not very different.
Another type of variable length encoding is described in Picture Coding Symposium PCS86, Tokyo, Japan 2-4 Apr. 1986, pages 148-149; and consists in:
reorganizing the series of data words constituting each block by classifying the words in n classes No i, for i=1 to n, the class No i grouping all of the words having i significant bits;
transmitting the words of non-zero value, of each class No i for i=1 to n successively, omitting to transmit the most significant bit, and each transmitted word being accompanied by an address marking the position of the word in its block. This address is a relative address computed by subtracting from the absolute address of the word to be encoded the absolute address of the last word having been previously encoded in the same class as the word to be encoded. Then this relative address is encoded by a Huffmann encoding.
The decoding successively consists, for each class No i, for i=1 to n, and for each transmitted data word, in:
reconstituting the most significant bit;
deriving the absolute address of each transmitted data word from its encoded address;
and consists in reconstituting the block of data words from the transmitted words thus reconstituted, and from their absolute addresses, by inserting words of zero value at the absolute addresses for which no word has been transmitted.